package serveurPoste;

import java.util.ArrayList;

public class BanqueDossiers {
	private CollectionDossiers dossiers;
	private int currentid = 0;
	
	public BanqueDossiers()
	{
		dossiers = new CollectionDossiers();
	}
	

	
	public Dossier trouverInfractionParId(int idInfraction)
	{
		if(dossiers.getListeDossier().size()<idInfraction){
			return null;
		}
		Dossier dossierRetour = dossiers.getListeDossier().get(idInfraction);
	
		
		return dossierRetour;
	}
	
	
	
	public void ajouterDossier(String prenom, String nom, String noPermis, String noPlaque)
	{
		Dossier theDossier = new Dossier(currentid++, nom, noPermis, noPlaque, prenom);
		dossiers.getListeDossier().add(theDossier);
	}
	
	public int getReactionsSize(){
		return dossiers.size();
	}
	
	public CollectionDossiers getDossiersList(){
		return dossiers;
	}
		
}
